Skip to content

Package size generator for README#924

Merged
davedbase merged 4 commits into
solidjs-community:nextfrom
davedbase:package-size-generator
Jun 2, 2026
Merged

Package size generator for README#924
davedbase merged 4 commits into
solidjs-community:nextfrom
davedbase:package-size-generator

Conversation

@davedbase
Copy link
Copy Markdown
Member

I'm tired of depending on the Bundlephobia data generator so I've put an adjustment together that will use the measure script to update the package.json and eventually the README file badges.

scripts/measure.ts — Extended the existing measure script with three new behaviours:

  • Run with no arguments from a package directory to measure just that package (auto-detected via CWD)
  • Run with no arguments from the repo root to measure all packages at once
  • --save flag writes the gzip size to primitive.gzip in each package's package.json and replaces the Bundlephobia badge in each package's README.md with a static shields.io badge

scripts/update-readme.ts — Updated to use the stored primitive.gzip value when generating the root README's Size column, falling back to Bundlephobia only when no local value exists.

scripts/utils/get-modules-data.ts — Added gzip?: number to the PrimitiveData type.

template/package.json — Added "measure" script so new packages get it automatically.

.github/workflows/tests.yml — On pushes to main only (not PRs), runs pnpm measure --save && pnpm update-readme after a green build and commits any size changes back with [skip ci].

90 packages updatedprimitive.gzip written to each package.json and size badges updated in READMEs and the root README table.

@davedbase davedbase added this to the Solid 2.0 Migration milestone Jun 1, 2026
@davedbase davedbase added the enhancement New feature or request label Jun 1, 2026
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Jun 1, 2026

⚠️ No Changeset found

Latest commit: 96f3fcc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jun 1, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 6437d898-2d5b-4f9e-9360-4a8a9ccec014

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

@davedbase davedbase changed the title patch: Package size generator for README enhancement: Package size generator for README Jun 1, 2026
@davedbase davedbase changed the title enhancement: Package size generator for README Package size generator for README Jun 1, 2026
@davedbase davedbase marked this pull request as ready for review June 1, 2026 12:59
@davedbase davedbase changed the base branch from main to next June 1, 2026 13:00
@davedbase davedbase merged commit a5e620c into solidjs-community:next Jun 2, 2026
1 check passed
@davedbase davedbase deleted the package-size-generator branch June 2, 2026 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants